<?php
require_once 'Hamlap/Html/Element/Base.php';
class Hamlap_Html_Element_Text extends Hamlap_Html_Element_Base
{
	/**
	 * Instantiate a new text element
	 * @param string $text
	 * @return unknown_type
	 */
	public function __construct($text)
	{
		$text = ltrim($text, ' ');
		if(!empty($text))
			$this->addChild($text);
	}

	/**
	 * Render this element as HTML
	 * @see Hamlap/Hamlap_Base#render()
	 * @return string
	 */
	final public function render()
	{
		return $this->renderChildren();
	}
}